import uniHttp from 'rt-uni-utils/request';
import { Ioperation, Ilist, IeditPrice ,Idetail} from './vo/goods';

class Commodity{
	/* 商品列表 */
	list(data: any) {
		return uniHttp.post('/goods/product/get_product_list',data);
	}
	/* 上架/下架商品 */
	operation(data: Ioperation) {
		return uniHttp.post('/goods/product/update_product_by_id', data);
	}
	/* 修改价格 */
	editPrice(data: IeditPrice) {
		return uniHttp.post('/goods/product/update_product_price_by_id', data);
	}
	/* 商品详情 */
	detail(data: Idetail) {
		return uniHttp.get('/goods/product/get_product_by_id', data);
	}
}
export const goods = new Commodity();
